﻿<%@ Control Language="C#" %>
<%@ Register Assembly="TunyNet.Web.UI" Namespace="TunyNet.Web.UI" TagPrefix="Tunynet" %>
<%@ Register Assembly="ChinaCustoms.Qingdao.Workflow.Controls" Namespace="ChinaCustoms.Qingdao.Workflow.Controls"
    TagPrefix="WFU" %>
<style type="text/css" media="screen">
    a.workflowControllerButton
    {
        display: inline-block;
        border: solid 1px #87a3c1;
        background: #e2f2ff;
        white-space: nowrap;
        padding: 6px 6px 3px;
        font-size: 12px;
        line-height: 1em;
        color: #069;
        text-decoration: none;
    }
    a.workflowControllerButton:hover
    {
        background: #b7d9ff;
        text-decoration: none;
        color: #f30;
        text-decoration: underline;
    }
</style>

<script language="javascript" type="text/javascript">
<!--
    function getNextActivityExecutor(result)
    {
	    if (result != null)
	    {
		    arr = result.split("|");
		    document.getElementById('<%= NextActivityExecutorLabel.ClientID %>').innerHTML = arr[0];
		    document.getElementById('<%= NextActivityExecutorHidden.ClientID %>').value = arr[1];
	    }
    }
    
    function getOrganizationsOfSubFlow(result)
    {
	    if (result != null)
	    {
		    arr = result.split("|");
		    document.getElementById('<%= SubFlowOrganizationsLabel.ClientID %>').innerHTML = arr[0];
		    document.getElementById('<%= SubFlowOrganizationsHidden.ClientID %>').value = arr[1];
	    }
    }

//-->
</script>

<asp:UpdatePanel runat="server" ID="UpdatePanel" UpdateMode="Conditional" ChildrenAsTriggers="true">
    <Triggers>
        <asp:PostBackTrigger ControlID="SaveButton" />
        <asp:PostBackTrigger ControlID="NextStepButton" />
    </Triggers>
    <ContentTemplate>
        <fieldset runat="server" id="InputPostilBlock" style="padding: 10px;" visible="false">
            <legend style="font-size: 14px">录入意见</legend>
            <table>
                <tr>
                    <td valign="top" style="font-size: 12px">
                        填写意见：
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="Postil" TextMode="MultiLine" Columns="70" Rows="4" />
                    </td>
                </tr>
            </table>
        </fieldset>
        <fieldset runat="server" id="NextActionSettingBlock" style="padding: 10px">
            <legend>流转控制</legend>
            <table runat="server" id="NextActionBlock">
                <tr runat="server" id="NextActionSelectArea">
                    <td>
                        下个流程：
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="NextActionSelect" />
                    </td>
                </tr>
                <tr runat="server" id="NextActivityExecutorArea" visible="false">
                    <td>
                        执&nbsp;&nbsp;行&nbsp;&nbsp;人：
                    </td>
                    <td>
                        <asp:Label runat="server" ID="NextActivityExecutorLabel" />
                        <input type="hidden" id="NextActivityExecutorHidden" runat="server" name="NextActivityExecutorHidden" />
                        <WFU:ModalLink runat="server" ID="NextActivityExecutorLink" Text="选择" DestinationURL="~/Utility/UserSelector.aspx"
                            CallBack="getNextActivityExecutor"></WFU:ModalLink>
                        <asp:CustomValidator runat="server" ID="NextActivityExecutorCustomValidator" ValidationGroup="WorkflowController"
                            ErrorMessage="请选择下一流程的具体执行人" Text="*" />
                    </td>
                </tr>
                <tr runat="server" id="SubFlowOrganizationsArea" visible="false">
                    <td>
                        流程分发：
                    </td>
                    <td>
                        <asp:Label runat="server" ID="SubFlowOrganizationsLabel" />
                        <input type="hidden" id="SubFlowOrganizationsHidden" runat="server" name="SubFlowOrganizationsHidden" />
                        <WFU:ModalLink runat="server" ID="SubFlowOrganizationsLink" Text="选择" DestinationURL="~/Utility/OrganizationSelector.aspx"
                            CallBack="getOrganizationsOfSubFlow"></WFU:ModalLink>
                        <asp:CustomValidator runat="server" ID="SubFlowOrganizationsCustomValidator" ErrorMessage="请选择启动子流程的部门"
                            ValidationGroup="WorkflowController" Text="*" />
                    </td>
                </tr>
            </table>
        </fieldset>
        <table width="100%" runat="server" id="ButtonBlock">
            <tr>
                <td style="width: 70%">
                    <asp:HyperLink runat="server" ID="WorkflowTrackingLink" Text="流程跟踪" Target="_blank"
                        Visible="false" />
                </td>
                <td style="width: 30%">
                    <asp:LinkButton runat="server" ID="SaveButton" Text="保存" CssClass="workflowControllerButton" />&nbsp;&nbsp;
                    <asp:LinkButton runat="server" ID="NextStepButton" Text="流转" CssClass="workflowControllerButton" />
                </td>
            </tr>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>
